<?php if(!class_exists('raintpl')){exit;}?><div id="access" role="navigation">
	<div class="menu">
		<ul>
			<li class="page_item"><a href="<?php echo $url;?>admin/">Home</a></li>
		<?php $counter1=-1; if( isset($main_module) && is_array($main_module) && sizeof($main_module) ) foreach( $main_module as $key1 => $value1 ){ $counter1++; ?>
			<li class="page_item"><a href="<?php echo $value1["link"];?>"><?php echo $value1["title"];?></a>
				<ul class='children'>
				<?php $counter2=-1; if( isset($sub_module) && is_array($sub_module) && sizeof($sub_module) ) foreach( $sub_module as $key2 => $value2 ){ $counter2++; ?>
					<?php if( $value2["module"]==$value1["module"] ){ ?>
						<li class="page_item"><a href="<?php echo $value2["link"];?>"><?php echo $value2["title"];?></a></li>
					<?php } ?>
				<?php } ?>
				</ul>
			</li>
		<?php } ?>
			<li style = "float:right"><a href="<?php echo $url;?>admin/logout.php">Logout</a></li>
		</ul>
	</div>
</div>

<div class = "clear"></div>